
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type UserRechargeRequest struct {

	Uid string `json:"uid" form:"uid"`

	OrderId string `json:"order_id" form:"order_id"`

	TradeNo string `json:"trade_no" form:"trade_no"`

	Price string `json:"price" form:"price"`

	GivePrice string `json:"give_price" form:"give_price"`

	RechargeType string `json:"recharge_type" form:"recharge_type"`

	Paid string `json:"paid" form:"paid"`

	PayTime string `json:"pay_time" form:"pay_time"`

	AddTime string `json:"add_time" form:"add_time"`

	RefundPrice string `json:"refund_price" form:"refund_price"`

	ChannelType string `json:"channel_type" form:"channel_type"`

}

func (r *UserRechargeRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *UserRechargeRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"uid": "required",

		"order_id": "required",

		"trade_no": "required",

		"price": "required",

		"give_price": "required",

		"recharge_type": "required",

		"paid": "required",

		"pay_time": "required",

		"add_time": "required",

		"refund_price": "required",

		"channel_type": "required",

	}
}

func (r *UserRechargeRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserRechargeRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserRechargeRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
